
// import FileSaver from "file-saver";
// import * as XLSX from "xlsx";
// export const exportExcel = (name, tableName) => {
//     const sheetObj = XLSX.utils.table_to_book(document.querySelector(tableName));
//     const sheetBlob = XLSX.write(sheetObj, {
//       bookType: "xlsx",
//       bookSST: true,
//       type: "array",
//     });

//     try {
//       FileSaver.saveAs(
//         new Blob([sheetBlob], { type: "application/octet-stream" }),
//         name
//       );
//     } catch (e) {
//       if (typeof console !== "undefined") console.log(e, sheetBlob);
//     }

//     return sheetBlob;
//   };
